<%@ Page Language="C#" MasterPageFile="~/Demo.master" AutoEventWireup="true" CodeFile="EventSelecting.aspx.cs"
    Inherits="EventSelecting" Title="Event Selecting (Calendar) | DayPilot Pro Demo" Culture="en-US" %>

<%@ Register Assembly="DayPilot" Namespace="DayPilot.Web.Ui" TagPrefix="DayPilot" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <DayPilot:DayPilotCalendar ID="DayPilotCalendar1" runat="server" 
        DataEndField="end"
        DataStartField="start" 
        DataTextField="name" 
        DataValueField="id" 
        DataAllDayField="allday" 
        Days="7" 
        OnTimeRangeSelected="DayPilotCalendar1_TimeRangeSelected"
        TimeRangeSelectedHandling="CallBack" 
        ClientObjectName="dpc1"
        EventClickHandling="Select" 
        EventSelectHandling="JavaScript" 
        EventSelectJavaScript="if (e) alert(e.value()); else alert('deselected');" 
        OnEventSelect="DayPilotCalendar1_EventSelect"
        EventMoveHandling="CallBack" 
        OnEventMove="DayPilotCalendar1_EventMove"
        
        CssClassPrefix="calendar_silver_"
        HourNameBackColor=""
        BorderColor="#A0A0A0"
        CellBorderColor="#A0A0A0"
        EventBorderColor="#505050"
        AllDayEventBorderColor="#a0a0a0"
        >
    </DayPilot:DayPilotCalendar>
    <br />
    <a href="#" onclick="if (dpc1.selectedEvent()) alert(dpc1.selectedEvent().value()); else alert('No event selected'); return false; ">
        Get selected event id</a><br />
    <a href="#" onclick="dpc1.cleanEventSelection(); return false; ">
        Clean selection</a><br />
        
</asp:Content>
